#pragma once

#include "..\cz_def.h"

#define cz_log_DebugPrintfT							CZ_COMBINET(cz_log_DebugPrintf, )
#define cz_log_SetMsgFunctionT						CZ_COMBINET(cz_log_SetMsgFunction, )
#define cz_log_MsgT									CZ_COMBINET(cz_log_Msg, )

#ifdef CZ_SHOW_LOG
#define CZ_LOG_ERRORT(s)							cz_log_DebugPrintfT(_T("error - %s(%d): %s"), __TFILE__, __LINE__, (s))
#define CZ_LOG_ERRORA(s)							cz_log_DebugPrintfA("error - %s(%d): %s", __FILE__, __LINE__, (s))
#define CZ_LOG_ERRORW(s)							cz_log_DebugPrintfW(L"error - %s(%d): %s", __WFILE__, __LINE__, (s))

#define CZ_LOG_WARNINGT(s)							cz_log_DebugPrintfT(_T("warning - %s(%d): %s"), __TFILE__, __LINE__, (s))
#define CZ_LOG_WARNINGA(s)							cz_log_DebugPrintfA("warning - %s(%d): %s", __FILE__, __LINE__, (s))
#define CZ_LOG_WARNINGW(s)							cz_log_DebugPrintfW(L"warning - %s(%d): %s", __WFILE__, __LINE__, (s))
#else	// CZ_SHOW_LOG
#define CZ_LOG_ERRORT(s)
#define CZ_LOG_ERRORA(s)
#define CZ_LOG_ERRORW(s)

#define CZ_LOG_WARNINGT(s)
#define CZ_LOG_WARNINGA(s)
#define CZ_LOG_WARNINGW(s)
#endif	// CZ_SHOW_LOG

typedef bool (WINAPI *cz_log_callback_MsgW)(IN wcharc* pwcsMsg, IN void* pUserData);
typedef bool (WINAPI *cz_log_callback_MsgA)(IN charc* pstrMsg, IN void* pUserData);

bool cz_log_DebugPrintfW(IN wcharc* pwcsFormat, ...);
bool cz_log_DebugPrintfA(IN charc* pstrFormat, ...);

bool cz_log_SetMsgFunctionW(IN cz_log_callback_MsgW pfMsg, IN void* pUserData);
bool cz_log_SetMsgFunctionA(IN cz_log_callback_MsgA pfMsg, IN void* pUserData);

bool cz_log_MsgW(IN wcharc* pwcsFormat, ...);
bool cz_log_MsgA(IN charc* pstrFormat, ...);

